@datapos/datapos-development 0.3.117 → 0.3.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,31 +110,31 @@ async function D() {
110
110
  console.error("Error updating README:", i), process.exit(1);
111
111
  }
112
112
  }
113
- async function I() {
113
+ async function M() {
114
114
  const o = "<!-- OWASP_BADGE_START -->", e = "<!-- OWASP_BADGE_END -->";
115
115
  try {
116
- const i = JSON.parse(await t.readFile("./dependency-check-reports/dependency-check-report.json", "utf-8")), n = { critical: 0, high: 0, moderate: 0, low: 0, info: 0, unknown: 0 };
116
+ const i = JSON.parse(await t.readFile("./dependency-check-reports/dependency-check-report.json", "utf-8")), n = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
117
117
  for (const u of i.dependencies)
118
118
  if (u.vulnerabilities != null)
119
- for (const m of u.vulnerabilities) {
120
- const g = m.severity?.toLowerCase() ?? "unknown";
121
- g in n ? n[g]++ : n.unknown++;
119
+ for (const g of u.vulnerabilities) {
120
+ const m = g.severity?.toLowerCase() ?? "unknown";
121
+ m in n ? n[m]++ : n.unknown++;
122
122
  }
123
123
  const s = {
124
124
  critical: { color: "red", label: "Critical" },
125
125
  high: { color: "orange", label: "High" },
126
126
  moderate: { color: "yellow", label: "Moderate" },
127
127
  low: { color: "green", label: "Low" },
128
- info: { color: "brightgreen", label: "Info" },
129
128
  unknown: { color: "lightgrey", label: "Unknown" }
130
129
  }, r = [];
131
- for (const [u, m] of Object.entries(n)) {
132
- const g = s[u], y = `https://img.shields.io/badge/OWASP%20${g.label}-${m}-${g.color}`;
133
- r.push(`[![OWASP ${g.label}](${y})](./dependency-check-reports/dependency-check-report.html)`);
130
+ for (const [u, g] of Object.entries(n)) {
131
+ if (g === 0) continue;
132
+ const m = s[u], y = `https://img.shields.io/badge/OWASP%20${m.label}-${g}-${m.color}`;
133
+ r.push(`[![OWASP ${m.label}](${y})](./dependency-check-reports/dependency-check-report.html)`);
134
134
  }
135
- const d = Object.values(n).reduce((u, m) => u + m, 0);
135
+ const d = Object.values(n).reduce((u, g) => u + g, 0);
136
136
  console.info(`✅ Total vulnerabilities found: ${d}`), console.info(
137
- ` Critical: ${n.critical}, High: ${n.high}, Moderate: ${n.moderate}, Low: ${n.low}, Info: ${n.info}, Unknown: ${n.unknown}`
137
+ ` Critical: ${n.critical}, High: ${n.high}, Moderate: ${n.moderate}, Low: ${n.low}, Unknown: ${n.unknown}`
138
138
  );
139
139
  const a = await t.readFile("./README.md", "utf8"), c = a.indexOf(o), l = a.indexOf(e);
140
140
  (c === -1 || l === -1) && (console.error("❌ Markers not found in README.md."), process.exit(1));
@@ -146,7 +146,7 @@ async function I() {
146
146
  console.error("❌ Error updating README with OWASP badges:", i), process.exit(1);
147
147
  }
148
148
  }
149
- async function M() {
149
+ async function I() {
150
150
  try {
151
151
  console.info("🚀 Sending deployment notice...");
152
152
  const o = JSON.parse(await t.readFile("config.json", "utf8")), e = {
@@ -235,8 +235,8 @@ export {
235
235
  A as bumpVersion,
236
236
  F as echoScriptNotImplemented,
237
237
  D as insertLicensesIntoReadme,
238
- I as insertOWASPDependencyCheckBadgeIntoReadme,
239
- M as sendDeploymentNotice,
238
+ M as insertOWASPDependencyCheckBadgeIntoReadme,
239
+ I as sendDeploymentNotice,
240
240
  P as syncWithGitHub,
241
241
  T as uploadDirectoryToR2,
242
242
  _ as uploadModuleConfigToDO,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-development",
3
- "version": "0.3.117",
3
+ "version": "0.3.118",
4
4
  "description": "A library of utilities for managing the Data Positioning repositories.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",